<html>
<head>
	<title>Serialization benchmark results</title>
	<link href='default.css' rel='stylesheet' type='text/css' />
</head>
<body>

<h2>Results of <span>Northwind database rows serialization</span> benchmarks run at 17/08/2010</h2>
<span class="summary">These benchmarks show the total time in ticks (1/1000ms) that it takes each serializer to serialize and deserialize the first row from each table in the  <a href='http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Common/DataModel/NorthwindData.cs'>Northwind Database</a><strong>100,000</strong> Times. <br/><br/>The full source code of the serialization benchmarks (which generated this report) is <a href='http://code.google.com/p/servicestack/source/browse/trunk/Common/Northwind.Benchmarks/Northwind.Benchmarks.Console/Program.cs'>available here</a>.</span><div id='combined'>
<h3>Combined results of all benchmarks below</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>4097</td><th>4.68x</th><td>23558019</td><td>60261551</td><td>83819570</td><td>838.1957</td><th>6.93x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>1958</td><th>2.24x</th><td>31122650</td><td>81462889</td><td>112585539</td><td>1125.8554</td><th>9.31x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>4927</td><th>5.62x</th><td>62828907</td><td>48511200</td><td>111340107</td><td>1113.4011</td><th>9.21x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>2014</td><th>2.30x</th><td>26002603</td><td>68727099</td><td>94729702</td><td>947.2970</td><th>7.83x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>876</td><th>1x</th><td>5607749</td><td>6486997</td><td>12094746</td><td>120.9475</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>1549</td><th>1.77x</th><td>15017643</td><td>11986647</td><td>27004290</td><td>270.0429</td><th>2.23x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>1831</td><th>2.09x</th><td>15818648</td><td>15443998</td><td>31262646</td><td>312.6265</td><th>2.58x</th></tr>
</tbody>
</table>
</div>
<h3>Results of serializing and deserializing CategoryDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>275</td><th>4.74x</th><td>1668767</td><td>3856966</td><td>5525733</td><td>55.2573</td><th>7.83x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>95</td><th>1.64x</th><td>1565061</td><td>4609701</td><td>6174762</td><td>61.7476</td><th>8.76x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>329</td><th>5.67x</th><td>4110729</td><td>3140782</td><td>7251511</td><td>72.5151</td><th>10.28x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>110</td><th>1.90x</th><td>1141094</td><td>3945628</td><td>5086722</td><td>50.8672</td><th>7.21x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>58</td><th>1x</th><td>322900</td><td>382380</td><td>705280</td><td>7.0528</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>87</td><th>1.5x</th><td>852013</td><td>537787</td><td>1389800</td><td>13.898</td><th>1.97x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>95</td><th>1.64x</th><td>905827</td><td>586510</td><td>1492337</td><td>14.9234</td><th>2.12x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing CustomerDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>482</td><th>3.74x</th><td>2475585</td><td>7232026</td><td>9707611</td><td>97.0761</td><th>4.73x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>256</td><th>1.98x</th><td>2620913</td><td>8593563</td><td>11214476</td><td>112.1448</td><th>5.47x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>635</td><th>4.92x</th><td>7174199</td><td>6760429</td><td>13934628</td><td>139.3463</td><th>6.79x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>271</td><th>2.10x</th><td>2853456</td><td>7978714</td><td>10832170</td><td>108.3217</td><th>5.28x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>129</td><th>1x</th><td>867089</td><td>1184792</td><td>2051881</td><td>20.5188</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>202</td><th>1.57x</th><td>1359586</td><td>1167090</td><td>2526676</td><td>25.2668</td><th>1.23x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>242</td><th>1.88x</th><td>1519940</td><td>1624876</td><td>3144816</td><td>31.4482</td><th>1.53x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing EmployeeDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>851</td><th>2.43x</th><td>3950717</td><td>9925250</td><td>13875967</td><td>138.7597</td><th>4.54x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>598</td><th>1.71x</th><td>6568328</td><td>16201678</td><td>22770006</td><td>227.7001</td><th>7.45x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>1092</td><th>3.12x</th><td>14743117</td><td>9156627</td><td>23899744</td><td>238.9974</td><th>7.82x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>607</td><th>1.73x</th><td>5998553</td><td>16372992</td><td>22371545</td><td>223.7154</td><th>7.32x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>350</td><th>1x</th><td>1350324</td><td>1704289</td><td>3054613</td><td>30.5461</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>495</td><th>1.41x</th><td>3226411</td><td>2759202</td><td>5985613</td><td>59.8561</td><th>1.96x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>574</td><th>1.64x</th><td>3052764</td><td>4222201</td><td>7274965</td><td>72.7496</td><th>2.38x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing EmployeeTerritoryDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>233</td><th>12.94x</th><td>1652463</td><td>4448438</td><td>6100901</td><td>61.0090</td><th>11.11x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>38</td><th>2.11x</th><td>1375635</td><td>3931130</td><td>5306765</td><td>53.0676</td><th>9.66x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>234</td><th>13x</th><td>2867144</td><td>2598752</td><td>5465896</td><td>54.6590</td><th>9.95x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>53</td><th>2.94x</th><td>1444366</td><td>2969233</td><td>4413599</td><td>44.1360</td><th>8.03x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>18</td><th>1x</th><td>384972</td><td>164404</td><td>549376</td><td>5.4938</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>32</td><th>1.78x</th><td>653348</td><td>307542</td><td>960890</td><td>9.6089</td><th>1.75x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>38</td><th>2.11x</th><td>1046754</td><td>387097</td><td>1433851</td><td>14.3385</td><th>2.61x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing OrderDetailDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>282</td><th>0x</th><td>1806608</td><td>5763621</td><td>7570229</td><td>75.7023</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>74</td><th>0x</th><td>2249226</td><td>5408557</td><td>7657783</td><td>76.5778</td><th>0x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>315</td><th>0x</th><td>4079307</td><td>3808086</td><td>7887393</td><td>78.8739</td><th>0x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>94</td><th>0x</th><td>2343149</td><td>6610405</td><td>8953554</td><td>89.5355</td><th>0x</th></tr><tr class='failed'><th class='c1'>ProtoBuf.net</th><td>21</td><th>0x</th><td>554688</td><td>-1</td><td>554687</td><td>5.5469</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>64</td><th>0x</th><td>1700140</td><td>1075569</td><td>2775709</td><td>27.7571</td><th>0x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>74</td><th>0x</th><td>1315520</td><td>1023400</td><td>2338920</td><td>23.3892</td><th>0x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing OrderDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>615</td><th>5.69x</th><td>3663831</td><td>9063394</td><td>12727225</td><td>127.2722</td><th>6.66x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>366</td><th>3.39x</th><td>7081820</td><td>14500374</td><td>21582194</td><td>215.8219</td><th>11.30x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>758</td><th>7.02x</th><td>12201868</td><td>7103028</td><td>19304896</td><td>193.0490</td><th>10.11x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>366</td><th>3.39x</th><td>5431817</td><td>14133025</td><td>19564842</td><td>195.6484</td><th>10.24x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>108</td><th>1x</th><td>851371</td><td>1058400</td><td>1909771</td><td>19.0977</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>253</td><th>2.34x</th><td>3048129</td><td>2431096</td><td>5479225</td><td>54.7922</td><th>2.87x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>318</td><th>2.94x</th><td>3232026</td><td>3612393</td><td>6844419</td><td>68.4442</td><th>3.58x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing ProductDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>452</td><th>11.3x</th><td>2294773</td><td>7470820</td><td>9765593</td><td>97.6559</td><th>16.98x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>187</td><th>4.68x</th><td>3351720</td><td>10528520</td><td>13880240</td><td>138.8024</td><th>24.14x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>508</td><th>12.7x</th><td>5538313</td><td>5253992</td><td>10792305</td><td>107.9230</td><th>18.77x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>189</td><th>4.72x</th><td>2907845</td><td>7718021</td><td>10625866</td><td>106.2587</td><th>18.48x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>40</td><th>1x</th><td>429266</td><td>145701</td><td>574967</td><td>5.7497</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>163</td><th>4.08x</th><td>1867707</td><td>2254170</td><td>4121877</td><td>41.2188</td><th>7.17x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>187</td><th>4.68x</th><td>1966364</td><td>1977717</td><td>3944081</td><td>39.4408</td><th>6.86x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing RegionDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>209</td><th>19x</th><td>1280511</td><td>3618303</td><td>4898814</td><td>48.9881</td><th>14.20x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>38</td><th>3.45x</th><td>1419046</td><td>4597709</td><td>6016755</td><td>60.1676</td><th>17.44x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>223</td><th>20.27x</th><td>2739949</td><td>2545950</td><td>5285899</td><td>52.8590</td><th>15.33x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>38</td><th>3.45x</th><td>900106</td><td>2268116</td><td>3168222</td><td>31.6822</td><th>9.19x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>11</td><th>1x</th><td>203831</td><td>141072</td><td>344903</td><td>3.4490</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>32</td><th>2.91x</th><td>780021</td><td>285317</td><td>1065338</td><td>10.6534</td><th>3.09x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>38</td><th>3.45x</th><td>590811</td><td>354929</td><td>945740</td><td>9.4574</td><th>2.74x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing ShipperDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>235</td><th>6.91x</th><td>1268695</td><td>3390337</td><td>4659032</td><td>46.5903</td><th>6.18x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>64</td><th>1.88x</th><td>1567419</td><td>4765675</td><td>6333094</td><td>63.3309</td><th>8.41x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>269</td><th>7.91x</th><td>3904361</td><td>3070608</td><td>6974969</td><td>69.7497</td><th>9.26x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>64</td><th>1.88x</th><td>1252863</td><td>3184918</td><td>4437781</td><td>44.3778</td><th>5.89x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>34</td><th>1x</th><td>300857</td><td>452449</td><td>753306</td><td>7.5331</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>54</td><th>1.59x</th><td>852103</td><td>435416</td><td>1287519</td><td>12.8752</td><th>1.71x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>64</td><th>1.88x</th><td>1134439</td><td>619427</td><td>1753866</td><td>17.5387</td><th>2.33x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing SupplierDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>497</td><th>4.56x</th><td>3999081</td><td>7172254</td><td>11171335</td><td>111.7134</td><th>6.95x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>255</td><th>2.34x</th><td>3694304</td><td>9449395</td><td>13143699</td><td>131.4370</td><th>8.17x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>611</td><th>5.61x</th><td>6609649</td><td>5906828</td><td>12516477</td><td>125.1648</td><th>7.78x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>255</td><th>2.34x</th><td>2411479</td><td>7543959</td><td>9955438</td><td>99.5544</td><th>6.19x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>109</td><th>1x</th><td>671590</td><td>936412</td><td>1608002</td><td>16.0800</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>180</td><th>1.65x</th><td>1512646</td><td>1446982</td><td>2959628</td><td>29.5963</td><th>1.84x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>214</td><th>1.96x</th><td>1633112</td><td>1552982</td><td>3186094</td><td>31.8609</td><th>1.98x</th></tr>
</tbody>
</table>
<h3>Results of serializing and deserializing TerritoryDto 100,000 times</h3><table>
<caption>* All times measured in ticks and payload size in bytes</caption><thead><tr><th>Serializer</th><th>Payload size</th><th>Larger than best</th><th>Serialization</th><th>Deserialization</th><th>Total</th><th>Avg per iteration</th><th>Slower than best</th></tr></thead>
<tbody>
<tr class=''><th class='c1'>Microsoft DataContractSerializer</th><td>248</td><th>13.05x</th><td>1303596</td><td>4083763</td><td>5387359</td><td>53.8736</td><th>9.93x</th></tr><tr class=''><th class='c1'>Microsoft JsonDataContractSerializer</th><td>61</td><th>3.21x</th><td>1878404</td><td>4285144</td><td>6163548</td><td>61.6355</td><th>11.36x</th></tr><tr class=''><th class='c1'>Microsoft BinaryFormatter</th><td>268</td><th>14.11x</th><td>2939578</td><td>2974204</td><td>5913782</td><td>59.1378</td><th>10.90x</th></tr><tr class=''><th class='c1'>NewtonSoft.Json</th><td>61</td><th>3.21x</th><td>1661024</td><td>2612493</td><td>4273517</td><td>42.7352</td><th>7.88x</th></tr><tr class='best-size best-time'><th class='c1'>ProtoBuf.net</th><td>19</td><th>1x</th><td>225549</td><td>317098</td><td>542647</td><td>5.4265</td><th>1x</th></tr><tr class=''><th class='c1'>ServiceStack TypeSerializer</th><td>51</td><th>2.68x</th><td>865679</td><td>362045</td><td>1227724</td><td>12.2772</td><th>2.26x</th></tr><tr class=''><th class='c1'>ServiceStack JsonSerializer</th><td>61</td><th>3.21x</th><td>736611</td><td>505866</td><td>1242477</td><td>12.4248</td><th>2.29x</th></tr>
</tbody>
</table>
</body>
</html>

